(ns cljstalk2011.util)
;; macro-expansion is done by clojure; thus .clj extension
;; note: couldn't get it to work in REPL

; like clojure.core/time but returns the usual string
(defmacro js-time
  [expr]
  `(let [start# (js/Date.)
         ret# ~expr]
     (str "Elapsed time: " (- (js/Date.) start#) " msecs")))
